eventListeners

public abstract List<Observer<Event>> eventListeners(EventType eventType, boolean useCapture)

Returns the immutable list of event listeners that listen events of the given eventType in a phase that corresponds the given useCapture.

You can use one of the predefined event types provided by the EventType class as an eventType parameter or create it manually through the of, for example:

EventType.of("click");
If the event target has no added listeners of this event type, returns an empty collection.

Parameters

eventType

the type of the event that the listener will listen to

useCapture

a flag indicating that events of the given eventType will be dispatched to the given listener before being dispatched to any other EventTarget beneath it in the DOM tree. Events that are bubbling upward through the tree will not trigger the listener

Throws

when the document this instance belongs to is closed